<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Jquery</title>
    <script type="text/javascript" src="js/jquery-1.7.1.min.js"></script>
    <script type="text/javascript">
		$(document).ready(function(){
			$('.hover').mousemove(function(e){
				//$('#co').text('x: ' + e.clientX + 'y: ' + e.clientY);
				var hovertext = $(this).attr('hovertext');
				$('#hoverdiv').text(hovertext).show();
				$('#hoverdiv').css('top',e.clientY+10).css('left',e.clientX+10);
			}).mouseout(function(){
				$('#hoverdiv').hide();
			});
		});
    </script>
    <style type="text/css">
		#hoverdiv { 
			display:none;
			position:absolute;
			font-size: 14px;
			background-color:#0F6;
			color:#600;
			border: 1px solid;
			padding: 5px;
		}
	</style>
</head>
<body>
	<div id="hoverdiv">Some text in here</div>
	<a class="hover" href="http://www.google.com.vn/" hovertext="Google, a powerfull search engine">Google</a>
    <a class="hover" href="http://phpacademy.org/" hovertext="PHP tutorial">Phpacademy</a>
    <div id="co"></div>
</body>
</html>
